package com.liming.admin.service;

import com.liming.common.pojo.dto.order.admin.RefundPageQuery;
import com.liming.common.pojo.vo.PageVO;
import com.liming.common.pojo.vo.order.web.OrderDetailVO;
import com.liming.common.pojo.vo.order.web.RefundOrderVO;

/**
 * @author liming
 * @date 2025/3/1
 */
public interface OrderService {

    /**
     * 根据订单ID查询订单详情
     *
     * @param id 订单ID
     * @return 订单详情
     */
    OrderDetailVO orderDetail(Long id);

    /**
     * 退款订单分页
     *
     * @param query 查询参数
     * @return 退款订单分页
     */
    PageVO<RefundOrderVO> refundPage(RefundPageQuery query);

    /**
     * 商家同意退款
     *
     * @param refundOrderId 退款单ID
     * @return 是否成功
     */
    Boolean agreeRefund(Long refundOrderId);

    /**
     * 商家拒绝退款
     *
     * @param refundOrderId 退款单ID
     * @param reason        拒绝原因
     * @return 是否成功
     */
    Boolean refuseRefund(Long refundOrderId, String reason);

    /**
     * 商家查询退款
     *
     * @param refundOrderId 退款单ID
     * @return 是否成功
     */
    Boolean queryRefund(Long refundOrderId);
}
